//  设置唯一标识
const KEY = "HM-TT-01";

//  传递设置用户信息
const setUser = user => {
  window.sessionStorage.setItem(KEY, JSON.stringify(user));
};

// 获取用户信息
const getUser = () => {
  return JSON.parse(window.sessionStorage.getItem(KEY) || " {}");
};
// 删除用户信息
const delUser = () => {
  window.sessionStorage.removeItem(KEY);
};

// 输出
export default { setUser, getUser, delUser };
